#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTime>

#include "wgraph.h"
//#include "FuzzyCSPSolver/fcsp.h" gia' definito in solver
#include "FuzzyCSPSolver/solver.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:

    //menu tab
    void fnew();
    void fclose();
    void about();
    void howto();
    void ac_Partial();
    void ac_Complete();

    //button
    void start();
    void stop();
    void closeEvent(QCloseEvent *);

private:
    Ui::MainWindow *ui;
    wGraph* graph;
    fcsp::FCSP csp;
    fcsp::Solver solver;
    QTime timer;


    //utils
    bool cancel;
    bool acPartial;
    void errInput(QString,QString);
    void enableDisableAll();

};

#endif // MAINWINDOW_H
